
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="struts"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>用户密码修改</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<style type="text/css">
			<!--
			body {
				background-color: #aed4ff;
			}
			-->
		</style>
	
		<script>
		
			function isNull(str) {
				if (str == "")
					return true;
				var regu = "^[ ]+$";
				var re = new RegExp(regu);
				return re.test(str);
			}

			function verify() {
				if (isNull(document.getElementById("pwd_js").value)) {
					alert("旧密码不能为空");
					return false;
				} else if (isNull(document.getElementById("pwd_new_js").value)) {
					alert("新密码不能为空！");
					return false;
				} else if (document.getElementById("pwd_new_js").value != document
						.getElementById("pwd_new_confirm_js").value) {
					alert("两次输入的密码不相同！");
					return false;
				} else
					return true;

			}
		</script>
	</head>
	
	<body>
	    	<img src="/bookshop-online/image/bupt_user_info.jpg" width="216" height="257" hspace="200" vspace="150">
	    	<div style="margin:-400px 0px 0px 500px;">
		    	<struts:form action="userInfoAction_changepassword">
				<struts:label value="请输入旧密码和新密码"></struts:label>
				<struts:textfield name="oldPassword" label="旧密码" id="pwd_js"/>
				<struts:password name="newPassword" label="新密码" id="new_pwd_js"/>
				<struts:password name="newPasswordConfirm" label="新密码校验" id="new_pwd_confirm_js"/>
				<struts:submit value="修改" onclick="return verify();"></struts:submit>
				</struts:form>
				<a href="/bookshop-online/index.jsp">返回</a>
			</div>
	</body>
</html>